import { checkCreatSiteForm } from "../creatSiteForm/formRuler";
import rules from "../../../../utils/rules";
import request from "@/api/index";
import { ref, onMounted, reactive, watch, createVNode, nextTick } from "vue";
// isBoolean:true, // 是否为Boolean类型, 参数是否必须为boolen类型，不是根据options个数判断，是根据后台字段类型要求判断

const extendForm = [
  {
    value: "内容配置",
    type: "title",
    id: "contentSetup",
    children: [
      {
        value: true,
        param: "titleRepeat",
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "内容标题是否允许重复:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: true,
        param: "contentCommitAllowUpdate",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "已发布内容是否允许编辑:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "选为否时，只有将已发布的内容下线后才能进行编辑",
      },
      {
        value: true,
        param: "contentSaveVersion",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "保存内容时自动保存版本:",
        type: "radio",
        options: ["是", "否"],
        isBoolean: true, // 是否为Boolean类型
        tips: "设为是，保存内容时会自动保存当前版本",
      },
      {
        value: true,
        param: "openContentNewFlag",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否开启新内容标记:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "新内容标记在用户端对应的内容标题后会展示标记图片",
      },
      {
        value: "",
        param: "newContentTime",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入标记时间",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "",
        beforeText: "发布时间在",
        afterText: "小时内的内容，为新内容",
        type: "selectInput",
        optionValue: "newContentTimeUnit",
        options: ["天", "小时"],
        associated: "openContentNewFlag",
        associatedValue: true,
      },
      {
        value: [],
        param: "newContentResourceUrl",
        picId: "",
        picIdPram: "newContentResourceId",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请上传标记图片",
          msg2: "",
          api: "",
          key: "newContentResourceId",
          params: {}, //校验传参
        },
        label: "",
        beforeText: "标记图片:",
        afterText: "",
        maxCount: 1,
        accept: "png,jpg,jpeg,gif",
        uploadTitle: "上传图片",
        extra:
          "请上传png、jpg、jpeg、gif格式的图片，图片大小建议32*32PX的正方形图片",
        type: "singlePictrueUpload",
        optionValue: "newContentTimeUnit",
        associated: "openContentNewFlag",
        associatedValue: true,
      },
      // {
      //   value: true,
      //   param: "contentLikeLogin",
      //   rule: {
      //     required: false,
      //     validator: checkCreatSiteForm,
      //     trigger: ["change"],
      //     msg1: "",
      //     msg2: "",
      //     api: "",
      //     key: "siteDomain",
      //     params: {}, //校验传参
      //   },
      //   label: "点赞是否需要登录:",
      //   type: "radio",
      //   isBoolean: true, // 是否为Boolean类型
      //   options: ["是", "否"],
      //   tips: "",
      // },
    ],
  },
  {
    value: "静态化配置",
    type: "title",
    id: "siteWebStaticSetup",
    children: [
      {
        value: false,
        param: "isSupportStatic",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否开启站点静态化配置:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: '',
        param: "batchSize",
        placeholder: "建议输入100~5000之间",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "请输入静态化任务批量生成条数",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "下次静态化任务批量生成条数：",
        type: "numberInput",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        iptWidth: 174,
        afterText: "条",
        associated: "isSupportStatic",
        associatedValue: true,
      },
      {
        value: false,
        param: "isSupportAutoStatic",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否开启自动生成静态化:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        associated: "isSupportStatic",
        associatedValue: true,
      },
    ],
  },
  {
    value: "水印配置",
    type: "title",
    id: "waterMarkSetup",
    children: [
      {
        value: 1,
        param: "watermarkSet",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "水印类型:",
        type: "radio",
        isBoolean: false, // 是否为Boolean类型
        options: ["图片水印", "文字水印", "不使用水印"],
        tips: "",
      },
      {
        value: [],
        param: "watermarkPictureUrl",
        picId: "",
        picIdPram: "watermarkResourceId",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请上传水印图片",
          msg2: "",
          api: "",
          key: "watermarkResourceId",
          params: {}, //校验传参
        },
        label: "",
        beforeText: "",
        afterText: "",
        maxCount: 1,
        uploadTitle: "上传图片",
        accept: "png,jpg,jpeg,gif",
        extra: "",
        type: "singlePictrueUpload",
        optionValue: "newContentTimeUnit",
        associated: "watermarkSet",
        associatedValue: true,
      },
      {
        value: "",
        placeholder: "请输入",
        param: "watermarkTxt",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入水印文案",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        showCount: true,
        maxCount: 20,
        label: "水印文案:",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "watermarkSet",
        associatedValue: "2",
        marginLeft: 32,
        tips: "",
      },
      {
        value: "",
        placeholder: "请输入整数",
        param: "watermarkTxtSize",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入水印文案文字大小",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        showCount: true,
        label: "文字大小:",
        beforeText: "",
        afterText: "PX",
        type: "numberInput",
        associated: "watermarkSet",
        associatedValue: "2",
        marginLeft: 32,
        tips: "",
      },
      {
        value: "rgba(31, 109, 237, 100)",
        param: "watermarkTxtColour",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入水印文案颜色",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        showCount: true,
        label: "文字颜色:",
        beforeText: "",
        afterText: "",
        type: "colorPicker",
        associated: "watermarkSet",
        associatedValue: "2",
        marginLeft: 32,
        tips: "",
      },
      {
        value: "",
        param: "watermarkPosition",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "请选择水印位置",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "水印位置:",
        type: "grigPosition",
        watermarkPosition: [
          "左上",
          "上",
          "右上",
          "左",
          "中",
          "右",
          "左下",
          "下",
          "右下",
        ],
        associated: "watermarkSet",
        associatedValue: "!=3",
      },
      {
        value: 50,
        param: "watermarkTransparency",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "请选择水印透明度",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "水印透明度:",
        type: "watermarkTransparency",
        associated: "watermarkSet",
        associatedValue: "!=3",
      },
    ],
  },

  {
    value: "栏目设置",
    type: "title",
    id: "channelSetUp",
    children: [
      {
        value: true,
        param: "channelNameRepeat",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "栏目名称是否允许重复:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      // {
      //   value: 1,
      //   param: "channelVisitLimitType",
      //   rule: {
      //     required: true,
      //     validator: checkCreatSiteForm,
      //     trigger: ["change"],
      //     msg1: "",
      //     msg2: "",
      //     api: "",
      //     key: "siteDomain",
      //     params: {}, //校验传参
      //   },
      //   label: "栏目及内容页浏览设置:",
      //   type: "radio",
      //   isBoolean: false, // 是否为Boolean类型
      //   options: ["都需要登录", "仅内容页需要登陆", "都不需要登录"],
      //   tips: "",
      // },
      {
        value: true,
        param: "channelNormalLimitContribute",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "栏目是否允许用户投稿:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: "",
        param: "channelDisplayContentNumber",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入栏目列表每页内容数量",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "栏目列表每页内容数量:",
        beforeText: "",
        afterText: "条",
        type: "numberInput",
        associated: "",
        associatedValue: "",
      },
    ],
  },
  {
    value: "网站主题",
    type: "title",
    id: "themeSetup",
    children: [
      {
        value: 1,
        param: "greyRangeType",
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "一键变灰:",
        type: "radio",
        isBoolean: false,
        options: ["关闭", "仅首页变灰", "全站变灰"],
        tips: "",
      },
      {
        value: "",
        placeholder: "请输入图片白名单地址",
        param: "greyWhitelist",
        maxNum: 10,
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "",
        beforeText: "",
        afterText: "",
        marginLeft: '219',
        type: "textInput",
        associated: "greyRangeType",
        associatedValue: "!=1",
        greyWhitelist: [],
        showCount: false,
        addWhitelist: true,
        tips: "白名单中的图片将不会变灰，例如国徽，请慎重操作",
      },
    ],
  },

  {
    value: "评论配置",
    type: "title",
    id: "commentSetup",
    children: [
      {
        value: 1,
        param: "commentSet",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "评论权限:",
        type: "radio",
        isBoolean: false, // 是否为Boolean类型
        options: ["允许游客评论", "允许登录后评论", "不允许评论"],
        tips: "",
      },
      {
        value: "",
        param: "commentCycl",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入评论周期",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "评论周期:",
        beforeText: "",
        afterText: "秒",
        type: "numberInput",
        associated: "commentSet",
        associatedValue: "!=3",
      },
      {
        value: true,
        param: "commentAudit",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "评论审核:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["需要审核", "不需要审核"],
        tips: "",
        associated: "commentSet",
        associatedValue: "!=3",
      },
      {
        value: true,
        param: "commentAllowedLink",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "评论限制:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["允许评论中输入链接", "不允许评论中输入链接"],
        tips: "",
        associated: "commentSet",
        associatedValue: "!=3",
      },
    ],
  },
  {
    value: "访问配置",
    type: "title",
    id: "accessSetup",
    children: [
      {
        value: false,
        param: "loginSuccessVisitSite",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "登录后才能访问站点:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: false,
        param: "urlRelative",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否使用相对路径:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: false,
        param: "memberRedirectAssign",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "登录后跳转指定位置:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
        associated: "loginSuccessVisitSite",
        associatedValue: true,
      },
      {
        value: "",
        placeholder: "请输入跳转路径",
        param: "memberRedirectUrl",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入跳转路径",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "loginSuccessVisitSite,memberRedirectAssign",
        associatedValue: true,
      },
    ],
  },
  {
    value: "网站推送配置",
    type: "title",
    id: "pushSetup",
    children: [
      {
        value: true,
        param: "sitePushOpen",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否接受网站推送:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: "",
        placeholder: "请设置密码",
        param: "sitePushSecret",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请设置密码",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "",
        beforeText: "",
        afterText: "",
        marginLeft: 219,
        type: "textInput",
        associated: "sitePushOpen",
        associatedValue: true,
      },
      // {
      //   value: true,
      //   param: "siteAcquOpen",
      //   rule: {
      //     required: true,
      //     validator: checkCreatSiteForm,
      //     trigger: ["change"],
      //     msg1: "",
      //     msg2: "",
      //     api: "",
      //     key: "siteDomain",
      //     params: {}, //校验传参
      //   },
      //   label: "是否允许网站采集:",
      //   type: "radio",
      //   isBoolean: true, // 是否为Boolean类型
      //   options: ["是", "否"],
      //   tips: "",
      // },
      // {
      //   value: "",
      //   placeholder: "请输入密钥",
      //   param: "siteAcquSecret",
      //   rule: {
      //     required: true,
      //     validator: checkCreatSiteForm,
      //     trigger: ["blur"],
      //     msg1: "请输入密钥",
      //     msg2: "",
      //     api: "",
      //     key: "siteDomain",
      //     params: {}, //校验传参
      //   },
      //   label: "",
      //   beforeText: "",
      //   afterText: "",
      //   marginLeft: 219,
      //   type: "textInput",
      //   associated: "siteAcquOpen",
      //   associatedValue: true,
      // },
    ],
  },
  {
    value: "统计配置",
    type: "title",
    id: "statisticsSetup",
    children: [
      {
        value: false,
        param: "openSiteStatistic",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否开启站内统计:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: false,
        param: "openThirdStatistic",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否使用第三方统计:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "thirdStatisticCode",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入第三方统计代码",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        marginLeft: 220,
        label: "",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "openThirdStatistic",
        associatedValue: true,
      },
    ],
  },
  {
    value: "邮件服务配置",
    type: "title",
    id: "emailSetup",
    children: [
      {
        value: "",
        placeholder: "请输入",
        param: "smtpservice",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入邮件服务器主机地址",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "SMTP服务器:",
        extra: "设置 SMTP 邮件服务器主机地址，不推荐使用QQ个人邮箱",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "smtpport",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入邮件服务器端口号",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "SMTP端口:",
        extra:
          "邮件服务器端口，25默认http协议，465默认为https协议，推荐使用465",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "sendAccount",
        rule: {
          required: true,
          validator: rules.email,
          trigger: ["blur"],
          msg1: "请输入邮箱",
          msg2: "邮箱格式不正确",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "发件邮箱:",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "emailPassword",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入邮箱密码或授权码",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "邮箱密码:",
        extra: "一般为验证邮箱密码，如果使用网易邮箱，请填写授权码",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "",
        associatedValue: "",
      },
      {
        value: false,
        param: "sslUse",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["change"],
          msg1: "",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "是否使用SSL协议:",
        type: "radio",
        isBoolean: true, // 是否为Boolean类型
        options: ["是", "否"],
        tips: "",
      },
    ],
  },
  {
    value: "文件上传配置",
    type: "title",
    id: "fileUploadSetup",
    children: [
      {
        value: "图片",
        type: "title",
      },
      {
        value: [],
        placeholder: "请选择",
        param: "uploadPicSuffix",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请选择允许上传的图片类型",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "允许上传的图片类型:",
        extra: "",
        beforeText: "",
        afterText: "",
        type: "multipleSelect",
        options: ["jpg", "jpeg", "png", "gif", "bmp", "psd", "ico"],
        mode: "multiple",
        maxTagCount: 4,
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "uploadPicSize",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入单张图片大小限制",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "单张图片大小限制:",
        extra: "",
        beforeText: "",
        afterText: "",
        stringMode: false,
        type: "selecteNumberInput",
        precision: 0,
        options: ["KB", "MB"],
        optionsValue: 2,
        params_options: "uploadPicSizeType",
        associated: "",
        associatedValue: "",
      },
      {
        value: "视频",
        type: "title",
      },
      {
        value: [],
        placeholder: "请选择",
        param: "uploadVideoSuffix",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请选择允许上传的视频类型",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "允许上传的视频类型:",
        extra: "",
        beforeText: "",
        afterText: "",
        type: "multipleSelect",
        options: ["mp4", "rmvb", "3gp", "mkv", "wmv", "flv", "m4v", "mov"],
        mode: "multiple",
        maxTagCount: 4,
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "uploadVideoSize",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入单个视频大小限制",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "单个视频大小限制:",
        extra: "",
        beforeText: "",
        afterText: "",
        stringMode: false,
        type: "selecteNumberInput",
        precision: 0,
        options: ["KB", "MB"],
        optionsValue: 2,
        params_options: "uploadVideoSizeType",
        associated: "",
        associatedValue: "",
      },
      {
        value: "音频",
        type: "title",
      },
      {
        value: [],
        placeholder: "请选择",
        param: "uploadAudioSuffix",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请选择允许上传的音频类型",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "允许上传的视频类型:",
        extra: "",
        beforeText: "",
        afterText: "",
        type: "multipleSelect",
        options: ["mp3", "wav", "ogg", "acc"],
        mode: "multiple",
        maxTagCount: 4,
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "uploadAudioSize",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入单个音频大小限制",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "单个音频大小限制:",
        extra: "",
        beforeText: "",
        afterText: "",
        stringMode: false,
        type: "selecteNumberInput",
        precision: 0,
        options: ["KB", "MB"],
        optionsValue: 2,
        params_options: "uploadAudioSizeType",
        associated: "",
        associatedValue: "",
      },
      {
        value: "文档",
        type: "title",
      },
      {
        value: [],
        placeholder: "请选择",
        param: "uploadDocumentSuffix",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请选择允许上传的文档类型",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "允许上传的文档类型:",
        extra: "",
        beforeText: "",
        afterText: "",
        type: "multipleSelect",
        options: [
          "doc",
          "docx",
          "xls",
          "xlsx",
          // "wps",
          "ppt",
          "pptx",
          "pdf",
          "wpsx",
        ],
        mode: "multiple",
        maxTagCount: 4,
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "请输入",
        param: "uploadDocumentSize",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入单个文档大小限制",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "单个文档大小限制:",
        extra: "",
        beforeText: "",
        afterText: "",
        stringMode: false,
        type: "selecteNumberInput",
        precision: 0,
        options: ["KB", "MB"],
        optionsValue: 1,
        params_options: "uploadDocumentSizeType",
        associated: "",
        associatedValue: "",
      },
      {
        value: "附件",
        type: "title",
      },
      {
        value: undefined,
        placeholder: "请选择",
        param: "uploadAttachmentSuffixType",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请选择允许上传的附件类型",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "允许上传的附件类型:",
        title: "附件",
        extra: "",
        beforeText: "",
        afterText: "",
        type: "multipleSelect",
        options: ["不限制", "设置允许类型", "设置禁止类型"],
        mode: "single",
        associated: "",
        associatedValue: "",
      },
      {
        value: "",
        placeholder: "多个类型以英文的逗号隔开",
        param: "uploadAttachmentSuffix",
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入文件类型后缀名",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "请输入文件类型后缀名:",
        beforeText: "",
        afterText: "",
        type: "textInput",
        associated: "uploadAttachmentSuffixType",
        associatedValue: "!=1",
        marginLeft: 32,
      },
      {
        value: "",
        placeholder: "请输入",
        param: "uploadAttachmentSize",

        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: "请输入单个附件大小限制",
          msg2: "",
          api: "",
          key: "siteDomain",
          params: {}, //校验传参
        },
        label: "单个附件大小限制:",
        extra: "",
        beforeText: "",
        afterText: "",
        stringMode: false,
        type: "selecteNumberInput",
        precision: 0,
        options: ["KB", "MB"],
        optionsValue: 1,
        params_options: "uploadAttachmentSizeType",
        associated: "",
        associatedValue: "",
      },
      {
        value: "上传文件储存位置",
        type: "title",
      },
      {
        value: '',
        placeholder: '请选择',
        param: 'uploadFileMemory',
        personalParam: 'FTP',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '请选择FTP存储位置！',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "FTP:",
        beforeText: '',
        afterText: '',
        marginLeft: 32,
        type: 'multipleSelect',
        options: [],
        mode: 'single',
        associated: 'uploadFileMemoryType',
        associatedValue: 2,
      },
      {
        value: '',
        placeholder: '请选择',
        param: 'uploadFileMemory',
        personalParam: 'OSS',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '请选择OSS云储存！',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "OSS云储存:",
        beforeText: '',
        afterText: '',
        marginLeft: 32,
        type: 'multipleSelect',
        options: [],
        mode: 'single',
        associated: 'uploadFileMemoryType',
        associatedValue: 3,
      },
      {
        value: 1,
        param: 'uploadFileMemoryType',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '请选择模板文件储存服务器！',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "模板文件储存服务器:",
        type: 'radio',
        isBoolean: false, // 是否为Boolean类型
        options: ['本地服务器', 'FTP', 'OSS云储存'],
        tips: '',
      },
    ],
  },
];
export { extendForm };
